<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			// promise 两个状态 1:state 状态  2:result 结果
			// promise 状态   1:penging(准备) 2:fulfilled(已完成) 3:rejected(已拒绝)
			// promise 状态的改变 通过调用resolve()和reject()对象的状态
			const p =  new Promise((resolve,reject) => {
				resolve()   //调用对象状态就会改成fulfilled
				reject()  //调用对象状态就会改成rejected
			})
			console.dir(p)
		</script>
	</body>
</html>
